Brain Tumor Detection Using Image Processing Techniques

131

Canny Edge Detection

Canny edge detection algorithm is a widely-used method for detecting edges

which was proposed in 1986 by John F Canny [50]. It attempts to determine

the difference between objects as closely as feasible to reality. The following

are the stated steps of the edge detection algorithm.

Algorithm 4 : Canny Edge Detector Algorithm

1: The image is smoothed with a Gaussian filter

2: Gradient magnitude and direction are calculated using Sobel, Prewitt, or

Roberts operator.

3: Nonmaxima Suppression is applied to gradient magnitude to find edge

points. An edge point is a point whose intensity is locally maximal in the

gradient vector’s direction.

4: Hysteresis Thresholding: A double thresholding (Tlow and Thigh) algo-

rithm is used to detect strong and weak edge pixels

5: if pixelV alue > Thigh then

6:

it is a strong edge pixel

7: else if pixelV alueTlow and pixelV alueThigh then

8:

it is a weak edge pixel

9: else

10:

it is not an edge pixel

11: The detection of edges is completed by suppressing all other edges that

are not connected to the weak and strong edges.

Laplacian Based Operator

The Laplacian operator looks for zero crossings and detects edges based on

the image’s second derivative. The partial second order derivatives in x and y

directions are expressed as in Equation 4.31:

2f(x,y)

∂x2

= f(x + 1, y) + f(x1, y)2f(x, y)

2f(x,y)

∂y2

= f(x, y + 1) + f(x, y1)2f(x, y)

(4.31)

The Laplace for the two-variable function f(x, y) is computed by the sum-

mation of partial derivatives and represented as in Equation 4.32:

2f(x, y) = 2f(x,y)

∂x2

+ 2f(x,y)

∂y2

2f(x, y) = f(x + 1, y) + f(x1, y) + f(x, y + 1) + f(x, y1)4f(x, y)

(4.32)

Due to the Laplacian’s high sensitivity to noise, the image is first smoothed

using a Gaussian filter before the zero crossings are found using Laplacian.